import { createRouter, createWebHistory } from 'vue-router'

const router = createRouter({
  history: createWebHistory(import.meta.env.BASE_URL),
  routes: [
    {
      path: '/',
      name: 'AppHomePage',
      component: () => import('@/views/app/AppHomePage.vue'),
      children: []
    },
    {
      path: '/admin-home-page',
      name: 'AdminHomePage',
      component: () => import('@/views/admin/AdminHomePage.vue'),
      redirect: '/admin-home-page/user-manage',
      children: [
        {
          path: 'user-manage',
          name: 'UserManage',
          component: () => import('@/views/admin/user/UserManage.vue')
        },
        {
          path: 'article-classify-manage',
          name: 'ArticleClassifyManage',
          component: () =>
            import('@/views/admin/article/ArticleClassifyManage.vue')
        },
        {
          path: 'wait-audit-article-manage',
          name: 'WaitAuditArticleManage',
          component: () =>
            import('@/views/admin/article/WaitAuditArticleManage.vue')
        }
      ]
    }
  ]
})

export default router
